﻿using System.Configuration;
using SDCloudSolution.SDCloud.BusinessLayer.Interfaces;
using SDCloudSolution.SDCloud.DataLayer.Interfaces;
using SDCloudSolution.SDCloud.DataLayer.MongoDb.Interfaces;

namespace SDCloudSolution.SDCloud.Web.IoC
{
    /// <summary>
    /// Implements a settings provider in whole application.
    /// </summary>
    public class ApplicationSettingsProvider : 
        IIdentityDbConnectionStringProvider,
        ISdCloudMongoDbSettingsProvider,
        IFileStorageSettingsProvider
    {
        public string IdentityDbConnectionString => "DefaultConnection";

        public string FileStorageBasePath => ConfigurationManager.AppSettings["FileStorageBasePath"];

        public string ModelResultMongoStorageConnectionString => ConfigurationManager.AppSettings["MongoDbConnectionString"];

        public string ModelResultDataBaseName => ConfigurationManager.AppSettings["MongoDbDataBaseName"];
    }
}